package com.atguigu.gmall.client.service;

import com.atguigu.gmall.entity.OrderInfo;
import com.atguigu.gmall.result.RetVal;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

@FeignClient("shop-order")
public interface OrderFeignClientService {

    @GetMapping("/order/confirm")
    public RetVal<Map<String, Object>> confirm();

    @GetMapping("/order/getPayOrderInfo/{orderId}")
    public OrderInfo findOrderById(@PathVariable Long orderId);

    @PostMapping("/order/saveOrderInfoAndDetail")
    public Long saveOrderInfoAndDetail(@RequestBody OrderInfo orderInfo);

}
